<?php

namespace XYWY\Controller;

/**
 * ServiceController类
 *
 * @since 1.0 <2015-10-21> SoChishun <14507247@qq.com> Added.
 */
class ServicesController extends AppbaseController {

    public function index($id = 40) {
        if (40 == $id) {
            redirect(U('services_info', 'id=40'));
        }
        $news_list = DXA('POrgDocument/Document')->get_paging_list(array('category_id' => $id), $show);
        $this->assign('news_list', $news_list);
        $this->assign('page', $show);
        $this->display();
    }

    function services_detail($id = 0) {
        if ($id) {
            $data = DXA('POrgDocument/Document')->field('id, title, category_id, author, create_time')->find($id);
            $this->assign('data', $data);
        }
        $this->display();
    }

    function services_info() {
        $this->display();
    }

}
